/**
 * webapck配置总入口
 * 将配置分成三份，common/dev/prod
 */
const merge = require('webpack-merge');
const commonConfig = require('./build/webpack-common.config.js');
const developmentConfig = require('./build/webpack-dev.config.js');
const productionConfig = require('./build/webpack-prod.config.js');

module.exports = (env, args) => {
    if (args.mode === 'production') {
        return merge(commonConfig, productionConfig);
    } else {
        return merge(commonConfig, developmentConfig);
    }
};